#ifndef FRIENDLIST_H
#define FRIENDLIST_H
#include "chatwindow.h"
#include "addfriend.h"
#include "changeinformation.h"
#include <QDialog>
#include <QToolBox>
#include <QToolButton>
#include <QLabel>
#include <QButtonGroup>

namespace Ui {
class friendList;
}

class friendList : public QDialog
{
    Q_OBJECT

public:
    explicit friendList(QWidget *parent = nullptr);
    ~friendList();
    void setselfInformation(const QString&a,const QString&n,const QString&p,const QString&s);
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void insertFriend(const QString&pic,const QString&name,const QString&selfacc,const QString&friacc);

private slots:
    void on_toolButton_clicked();
    void on_toolButton_2_clicked();
    void on_toolButton_3_clicked();
    void chat();
    void onReadyRead();
    void onConnected();
    void onDisconnected();
    void addnewfriend(const QString&pic,const QString&name,const QString&selfacc,const QString&friacc);
    void on_toolButton_4_clicked();



    void on_toolButton_5_clicked();
    
signals:
    void clicked();

private:
    Ui::friendList *ui;
    QToolButton *toolBtn1_1;
    QToolButton *toolBtn1_2;
    QToolButton *toolBtn2_1;
    QButtonGroup *buttonGroup;
    QString selfaccount;
    QString selfpic;
    QString selfsig;
    QString selfname;
    QPoint windowPos;
    QPoint mousePos;
    QPoint dPos;
    addFriend *a;
    chatWindow *c1;
    QTcpSocket *tcpsocket;
    changeinformation *ci;

};

#endif // FRIENDLIST_H
